//
// Created by 李传智 on 2018/4/12.
//

#include "IDemux.h"
#include "Logger.h"

void IDemux::main() {
    while (!isExist) {
        if (isPaused()) {
            sleep(2);
            continue;
        }
        VideoData data = read();
        if (data.size > 0) {
            notify(data);
        } else {
            sleep(2);
        }
    }
}